//Load template data
//setup page data
function mainPage() {}
mainPage.prototype.constructor = mainPage;
mainPage.prototype =
{
    templateData: {},
    loadPage: function()
    {
        this.onOutput = function(title,pageTemplate) 
		{ 
			ProcessPageOutput(title,pageTemplate,'',false); 
			$('#SearchInput').bind('focus',LoadSearch);  
		};
        
        this.loadTemplate();
    },
    loadTemplate:function()
    {
        LoadFile(SkinDir + 'main.html', this.generateOutput.bind(this));
    },
    generateOutput: function(response)
    {
        //Just show the page
        var tpl = new Template();
        tpl.load(response);

        this.onOutput('Songbird',tpl);
    },
    onOutput: function(title,pageTemplate) {}
}

function LoadSearch(event)
{
	$('#SearchInput').unbind('focus');
	if (DEBUG) console.log('loading searches');
	//load search stuff
	PageChange('search');
}

gLastScriptLoaded = new mainPage();
gScriptLoaded();
